package org.xg.study.pd.mediator;

/**
 * @author CMG
 * @version 1.0
 * @description
 * @cLassName DefaultSqlSessionFactory
 * @date 2021/9/16 16:54
 **/
public class DefaultSqlSessionFactory implements SqlSessionFactory {

    private final Configuration configuration;

    public DefaultSqlSessionFactory(Configuration configuration) {
        this.configuration = configuration;
    }

    @Override
    public SqlSession openSession() {
        return new DefaultSqlSession(configuration.connection, configuration.mapperElement);
    }

}